<?php

use Illuminate\Foundation\Application;
use Illuminate\Http\Request;

define('LARAVEL_START', microtime(true));

// 跨域
$host_name = isset($_SERVER['HTTP_ORIGIN']) ? $_SERVER['HTTP_ORIGIN'] : '*';
header('Content-Type: text/html;charset=utf-8');
header("Access-Control-Allow-Origin: ".$host_name);
header('Access-Control-Allow-Methods:POST,GET,OPTIONS,DELETE');
header("Access-Control-Allow-Credentials: true");
header("Access-Control-Allow-Headers:Token,Uid,Terminal,Content-Type,Referer,User-Agent,Content-Type,Sec-Fetch-Mode,Content-Length,Accept-Encoding,X-Requested-with, Origin, XFILENAME,XFILECATEGORY,XFILESIZE, content-lang, Back-Token, User-Token, Build-Admin");



// Determine if the application is in maintenance mode...
if (file_exists($maintenance = __DIR__.'/../storage/framework/maintenance.php')) {
    require $maintenance;
}

// Register the Composer autoloader...
require __DIR__.'/../vendor/autoload.php';

// Bootstrap Laravel and handle the request...
/** @var Application $app */
$app = require_once __DIR__.'/../bootstrap/app.php';

$app->handleRequest(Request::capture());
